<?php
// +----------------------------------------------------------------------
// | Iecms [ Make the most exquisite CMS ]
// +----------------------------------------------------------------------
// | Copyright (c) 2009~2019 http://www.iemoo.com All rights reserved.
// +----------------------------------------------------------------------
// | Author: iemoo <i@iemoo.com>
// +----------------------------------------------------------------------
// | DateTime: 2019/11/19 11:08
// +----------------------------------------------------------------------
namespace app\admin\validate;

use think\Validate;

/**
 * 验证器
 * @package app\admin\validate
 */
class SystemItem extends Validate
{
    protected $rule = [
        'field'			=> 'require|alphaDash|unique:system_item',
		'name'			=> 'require|chsAlphaNum',
        'status'			=> 'require|number',
        'system_group_id'	=> 'require|number|gt:0'
    ];

    protected $message = [
        'field.require'				=> '请输入字段名',
		'field.alphaDash'			=> '字段名只能是字母和数字',
        'field.unique'				=> '字段名已存在',
		'name.require'				=> '请输入别名',
		'name.chsAlphaNum'				=> '别名只能是汉字、字母和数字',
        'status.require'			=> '请选择状态',
		'status.number'				=> '状态不正确',
        'system_group_id.require'	=> '请选择分组',
		'system_group_id.number'	=> '分组不正确',
		'system_group_id.gt'		=> '请选择分组'
    ];


}